home *** CD-ROM | disk | FTP | other *** search
/ Word Play Farm / Word Play Farm.iso / pc / movies / shared.dxr / 00512_Go to a crossword section.ls < prev    next >
Encoding:
Text File  |  1996-07-29  |  2.2 KB  |  100 lines

  1. on Go2Section Num
  2.   set movieName to InitSection(Num)
  3.   go(1, movieName)
  4. end
  5.  
  6. on go2ClueMovie
  7.   global gLow, gSectData, targetWord, gSelectWord, activeword, SFormat, gsLastLabel
  8.   set gSelectWord to EMPTY
  9.   set gsLastLabel to EMPTY
  10.   set lCount to the number of items in gSectData
  11.   set high to lCount + gLow
  12.   set activeword to SSelect(gLow)
  13.   set clueName to the name of cast the castNum of sprite the clickOn
  14.   set targetWord to LoseExt(clueName)
  15.   if item activeword of gSectData = 1 then
  16.     set audioname to makefilename(targetWord, SFormat)
  17.     PlayAudio(audioname)
  18.     updateStage()
  19.     repeat4Sound()
  20.   else
  21.     killSprites()
  22.     playclue()
  23.   end if
  24. end
  25.  
  26. on playclue
  27.   global targetWord, gJumpName
  28.   set lJumpName to the movieName
  29.   if the labelList contains targetWord then
  30.     MoviePlay(lJumpName, targetWord)
  31.   else
  32.     set file2get to makefilename(targetWord)
  33.     killSprites()
  34.     MoviePlay(file2get)
  35.   end if
  36. end
  37.  
  38. on CheckReward pDataList
  39.   set lCount to the number of items in pDataList
  40.   repeat with t = 1 to lCount
  41.     if item t of pDataList <> 1 then
  42.       return 0
  43.     end if
  44.   end repeat
  45.   return 1
  46. end
  47.  
  48. on PlayReward
  49.   global gSectNum, gPlayReward, gRewardMovie
  50.   if gPlayReward = 1 then
  51.     CloseSection()
  52.     set gPlayReward to 0
  53.     go(1, gRewardMovie)
  54.   end if
  55. end
  56.  
  57. on CheckAllSections
  58.   set lNumSections to RetConfig(0)
  59.   repeat with i = 1 to lNumSections
  60.     set lSectNum to CalcSectData(i)
  61.     set lSectData to GetUserData(lSectNum)
  62.     if CheckReward(lSectData) = 0 then
  63.       return 0
  64.     end if
  65.   end repeat
  66.   return 1
  67. end
  68.  
  69. on PlayFinal
  70.   global gPlayedFinalReward, gFinalReward
  71.   if (gPlayedFinalReward <> 1) and (CheckAllSections() = 1) then
  72.     set gPlayedFinalReward to 1
  73.     go(1, gFinalReward)
  74.   end if
  75. end
  76.  
  77. on CloseSection
  78.   global gSectNum, gSectData, wordlist, activeword, gInPuzzle, gPlayReward
  79.   set gSectData to EMPTY
  80.   set activeword to EMPTY
  81.   set gSectNum to EMPTY
  82.   set wordlist to EMPTY
  83.   set gInPuzzle to 0
  84.   set gPlayReward to 0
  85.   killSprites()
  86. end
  87.  
  88. on GoMainMenu
  89.   global gMainName, gMainLabel
  90.   if the movieName contains gMainName then
  91.     go(gMainLabel)
  92.   else
  93.     if length(gMainLabel) > 0 then
  94.       go(gMainLabel, gMainName)
  95.     else
  96.       go(1, gMainName)
  97.     end if
  98.   end if
  99. end
  100.